Binary GCD algorithm
نویسنده
چکیده
The binary GCD algorithm, also known as Stein’s algorithm, is an algorithm that computes the greatest common divisor of two nonnegative integers. Stein’s algorithm uses simpler arithmetic operations than the conventional Euclidean algorithm; it replaces division with arithmetic shifts, comparisons, and subtraction. Although the algorithm was first published by the Israeli physicist and programmer Josef Stein in 1967,[1] it may have been known in 1st-century China.[2]
منابع مشابه
Binary GCD Like Algorithms for Some Complex Quadratic Rings
On the lines of the binary gcd algorithm for rational integers, algorithms for computing the gcd are presented for the ring of integers in Q( √ d) where d ∈ {−2,−7,−11,−19}. Thus a binary gcd like algorithm is presented for a unique factorization domain which is not Euclidean (case d = −19). Together with the earlier known binary gcd like algorithms for the ring of integers in Q( √−1) and Q(√−3...
متن کاملAn Analysis of the Generalized Binary GCD Algorithm
In this paper we analyze a slight modification of Jebelean’s version of the k-ary GCD algorithm. Jebelean had shown that on n-bit inputs, the algorithm runs in O(n) time. In this paper, we show that the average running time of our modified algorithm is O(n/ logn). This analysis involves exploring the behavior of spurious factors introduced during the main loop of the algorithm. We also introduc...
متن کاملFPGA Implementation of an Extended Binary GCD Algorithm for Systolic Reduction of Rational Numbers
We present the FPGA implementation of an extension of the binary plus–minus systolic algorithm which computes the GCD (greatest common divisor) and also the normal form of a rational number, without using division. A sample array for 8 bit operands consumes 83.4% of an Atmel 40K10 chip and operates at 25 MHz.
متن کاملComputational Number Theory and Applications to Cryptography
• Greatest common divisor (GCD) algorithms. We begin with Euclid’s algorithm, and the extended Euclidean algorithm [2, 12]. We will then discuss variations and improvements such as Lehmer’s algorithm [14], the binary algorithms [12], generalized binary algorithms [20], and FFT-based methods. We will also discuss how to adapt GCD algorithms to compute modular inverses and to compute the Jacobi a...
متن کاملQuantum Circuits for GCD Computation with $O(n \log n)$ Depth and O(n) Ancillae
GCD computations and variants of the Euclidean algorithm enjoy broad uses in both classical and quantum algorithms. In this paper, we propose quantum circuits for GCD computation with O(n log n) depth with O(n) ancillae. Prior circuit construction needs O(n) running time with O(n) ancillae. The proposed construction is based on the binary GCD algorithm and it benefits from log-depth circuits fo...
متن کامل